<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<h:form id="frmMenuMain" prependId="false">
				<p:menu id="componentList" rendered="#{facesContext.externalContext.isUserInRole('ROLE_ADMIN')}">
					<p:submenu label="Mapa">					
						<p:menuitem value="Mapa"
							styleClass="#{navigationContext.getMenuitemStyleClass('home')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false"
							url="/home.xhtml" />						
					</p:submenu>
					<p:submenu label="Seguridad">
						<p:menuitem value="#{msgs['menu.role']}"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_role_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false"
							url="/pages/role/search.xhtml" />
						<p:menuitem value="#{msgs['menu.user']}"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_user_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false"
							url="/pages/user/search.xhtml" />
					</p:submenu>
					
					<p:submenu label="Gestión Inmuebles">
						<p:menuitem value="Propiedad"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_propiedad_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/propiedad/search.xhtml" />
						<p:menuitem value="Tipo de Propiedad"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_propiedadTipo_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/propiedadTipo/search.xhtml" />
						<p:menuitem value="Provincia"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_provincia_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/provincia/search.xhtml" />
						<p:menuitem value="Ciudad"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_ciudad_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/ciudad/search.xhtml" />
						<p:menuitem value="Barrio"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_barrio_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/barrio/search.xhtml" />
					</p:submenu>
					
					<p:submenu label="Alquileres y Pagos">
						<p:menuitem value="Alquileres"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_alquiler_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/alquiler/search.xhtml" />
						<p:menuitem value="Proximo a Vencer"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_alquiler_proximovencer')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/alquiler/proximovencer.xhtml" />
						<p:menuitem value="Alquileres a Pagar"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_alquiler_alquilerespagarinmobiliaria')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/alquiler/alquilerespagarinmobiliaria.xhtml" />
					</p:submenu>
					
					<p:submenu label="#{msgs.contable}">
						<p:menuitem value="#{msgs.cuenta}"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_cuenta_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/cuenta/search.xhtml" />
						<p:menuitem value="#{msgs.movimiento}"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_movimiento_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/movimiento/search.xhtml" />
						<p:menuitem value="Caja"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_cuenta_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/cuenta/view.xhtml?caja=ok" />
						<p:menuitem value="Renta"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_cuenta_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/cuenta/view.xhtml?renta=ok" />	
						<p:menuitem value="Tasa Interes"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_tasainteres_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/tasainteres/search.xhtml" />
					</p:submenu>
					
					<p:submenu label="#{msgs['cliente']}">
						<p:menuitem value="#{msgs['inquilino']}"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_inquilino_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/inquilino/search.xhtml" />
						<p:menuitem value="#{msgs.propietario}"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_propietario_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/propietario/search.xhtml" />
						<p:menuitem value="#{msgs['garante']}"
							styleClass="#{navigationContext.getMenuitemStyleClass('pages_garante_search')}"
							icon="ui-icon-updated-comp"
							onclick="selectComponentLink(this)" ajax="false" url="/pages/garante/search.xhtml" />
					</p:submenu>
				</p:menu>
			</h:form>

</ui:composition>
